#ifndef _NE_POLYGON_H_
#define _NE_POLYGON_H_

#include <mathematics/Geometry.h>

namespace ne
{
    class NEAPI Polygon : public Geometry
    {
        public:
            Polygon();

            Polygon(const Polygon &p);

            Polygon& operator = (const Polygon &p);

            Vector2& operator [] (const size_t v);

            const Vector2& operator [] (const size_t v) const;

            real* ptr();

            const real* ptr() const;

            void insertVertex(const size_t index, const Vector2 &v);

            void pushBackVertex(const Vector2 &v);

            bool popBackVertex();

            bool eraseVertex(const size_t index);

            void clearAllVertex();

            size_t getNumVertex() const;

            virtual GeometryClass getClass() const;

            virtual ~Polygon();

        protected:
            std::vector<Vector2> mVertexList;
    };
}

#endif
